---
title: Print DEF letter
summary: Computes the next hold date, requests a Defense Evaluation Form (DEF) letter, and marks the case as DEF-sent.
status: draft
owner: SAIF Documentation Pipeline
last_reviewed: 2026-08-21
library: SAIF.Application.Claim.Legal
reference_type: embedded
operation_id: OP-LGL-003
trigger: Save flow with sendDEF = True, or popup-triggered print
---

# Print DEF letter

This operation generates and queues a Defense Evaluation Form (DEF) letter request for the current case and marks the case as DEF-sent.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-LGL-003 |
| **Trigger** | `clsScheduleManager.PrintDEF()` invoked — from the Save flow when `sendDEF = True`, or from a popup context |
| **Inputs** | `CurrentCase` |
| **Outputs** | Letter request (via [Insert letter request](insert-letter-request.md)); `DefSentDate`/`SendDefFlag` updates |
| **Primary components** | `clsScheduleManager.PrintDEF` |
| **Entry point** | `SAIF.Application.Claim.Legal\LegalNet\clsScheduleManager.vb` |

## Steps

1. Compute the next Friday hold date (skip the current Friday, else advance to the next Friday).
2. Call [Insert letter request](insert-letter-request.md) with letter type `"DEFLT"` ([SQL-001](../sql/SQL-001-insert-letter-request.md)).
   - On failure: propagates unhandled from [Insert letter request](insert-letter-request.md).
3. Set `CurrentCase.DefSentDate = Today` and `SendDefFlag = clsConstants.Yes`, and reset the pending-send flag ([BR-LGL-004](../business-rules.md#br-lgl-004-printing-a-def-letter-marks-the-case-def-sent)).
4. If invoked from a popup context: propagate the DEF-sent flag to consolidated cases via `UpdateConsolDEFFLag`.
   - See [Consolidated-case propagation](consolidated-case-propagation.md) for the secondary-case update logic.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([PrintDEF invoked]) --> HoldDate[Compute next Friday hold date]
	HoldDate --> Insert[Insert letter request<br>type DEFLT]
	Insert --> Flags[Set DefSentDate = Today<br>SendDefFlag = Yes]
	Flags --> Popup{Invoked from popup?}
	Popup -->|Yes| Consol[Propagate DEF flag to<br>consolidated cases]
	Popup -->|No| EndOk([Done])
	Consol --> EndOk
```

## Failure and edge-case behavior

- Letter-request insertion failure: propagates unhandled from [Insert letter request](insert-letter-request.md); `DefSentDate`/`SendDefFlag` are not updated if the insert fails first.
- Popup context: additionally mirrors the DEF-sent flag onto every secondary consolidated case.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- `SAIF.Application.Claim.Legal\LegalNet\clsScheduleManager.vb`
- `SAIF.Application.Claim.Legal\LegalManagerBase.vb`
